Skip to main content

Variable Methods

An object defining methods for the Variable class.

SetFromPosition(sourcePosition)

Sets the variable's value from a workflow position's ID and description.

Parameters:

sourcePosition (required): FlowPosition
The workflow position from which to retrieve the ID and description.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


SetFromDepartment(sourceDepartment)

Sets the variable's value from a department's ID.

Parameters:

sourceDepartment (required): FlowDepartment
The department from which to retrieve the ID.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


Increment()

Increments the variable's value by 1, assuming the value is numeric.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


Initialize()

Initializes the variable. Can be used to set up default values or configurations for the variable before use.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


SetFromProjectName()

Sets the variable's value to the name of the current project in the workflow.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


SetConstantValue(value)

Sets the variable's value to a constant value, detaching it from any dynamic sources or links.

Parameters:

value (required): object
The constant value to assign to the variable.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


UnlinkObject()

Removes the link between the variable and its associated document object, making it a regular variable with no document link.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


ToLiquid()

Converts the variable to a Liquid-compatible object, useful for rendering in templates or workflows.

Returns:

Type: object
Returns the variable as a Liquid-compatible object.

This is a sync method. Method runs synchronously.


SetFromVariable(sourceVariable, sourceProperty)

Sets the variable's value from another variable, using either its value or text, depending on the property specified.

Parameters:

sourceVariable (required): Variable
The source variable whose value or text will be copied to the current variable.

sourceProperty (optional): string
The property of the source variable to copy ('value' or 'text').

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


Decrement()

Decrements the variable's value by 1, assuming the value is numeric.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


SetFromProfession(sourceProfession)

Sets the variable's value from a profession's ID.

Parameters:

sourceProfession (required): FlowProfession
The profession from which to retrieve the ID.

Returns:

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.